﻿using System;
using System.Collections.Generic;
using System.Reflection;
using Gp.Scripts.Core;
using Gp.Scripts.Utils;
using Sirenix.OdinInspector;

namespace Gp.Scripts.Data {
    [Serializable]
    public abstract class BaseProfession: IBonusProvider {
        [HideLabel, ProgressBar(0, 10, G = 1)] [HorizontalGroup(MarginLeft = 50, MarginRight = 50)]
        public int level = 1;


        protected abstract Type SpecialtyType { get; }

        
        /// <summary>
        /// 获取职业专长。Type 为专长类型
        /// </summary>
        /// <returns></returns>
        public virtual IEnumerable<Type> ProfessionSpecialities() {
            List<Type> t = new List<Type>();
            t.AddRange(GetType().Assembly.GetTargetType(baseClass: SpecialtyType));
            return t;
        }
        

        public ILogicEntity GetBonusProviderInfo() {
            throw new NotImplementedException("Not Implement yet");
        }


        public virtual IEnumerable<BonusNumber> Bonus() {
            return Array.Empty<BonusNumber>();
        }
    }
}